#pragma once

#include <thread>
#include <string>
#include <memory>
#include <chrono>
#include "model/AbstractNode.h"
 

namespace zeroplus::mq
{
    class ServerNode : public AbstractNode
    {
    private:
        Bytes identity_;

    public:
        ServerNode(const std::string &uri)
        {
            CreateConnection(zmqpp::socket_type::xrep, uri, ConnectType::bind);
        }

        ~ServerNode()
        {
        }

        bool Run();

        bool SendResponse(const Bytes &message);
        Bytes RecvRequest();
    };
}
